package com.heima.article.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author 马毅爽
* @description 针对表【ap_article(文章信息表，存储已发布的文章)】的数据库操作Mapper
* @createDate 2023-12-01 20:51:54
* @Entity com.heima.article.domain.ApArticle
*/
public interface ApArticleMapper extends BaseMapper<ApArticle> {

    /**
     * 获取文章列表 loadType : 1.最新 2.更多
     * @param loadType
     * @param dto
     * @return
     */
    List<ApArticle> loadArticle(Short loadType, ArticleHomeDto dto);

    List<ApArticle> findArticleListByLast5days(@Param("dayParam") Date dayParam);
}




